<template>
  <div class="root">
    <div class="row">
      <div class="cell" style="margin-right: 40px">
        <div class="label">当前版本信息</div>
        <div class="value">
          <el-input placeholder="" v-model="version"> </el-input>
        </div>
      </div>
    </div>

    <div class="row">
      <div class="cell" style="margin-right: 40px">
        <el-upload
          class="upload-demo"
          action="https://jsonplaceholder.typicode.com/posts/"
          :on-success="handleSuccess"
          :file-list="fileList"
          list-type="picture"
        >
          <div class="upload" @click="start">上传文件</div>
          <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
        </el-upload>

        <div class="value">
          <el-input placeholder="" v-model="fileAddress"> </el-input>
        </div>
      </div>
    </div>
    <div class="row" style="margin: 15px 0">
      <button class="button" style="margin-right: 25px" @click="start">
        开始更新
      </button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      version: "",
      fileAddress: "",
      fileList:[]
    };
  },
  methods: {
    loadData() {},
    handleSuccess(res, file) {
      // this.fileAddress = URL.createObjectURL(file.raw);
    },
    start() {},
  },
};
</script>

<style scoped lang="scss">
.root {
  height: 100%;
  width: 100%;
  display: flex;
  padding: 0 20px;
  flex-direction: column;
}
.row {
  display: flex;
  flex-direction: row;
}
.cell {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 15px;
  .label {
    width: 110px;
    text-align: left;
  }
  .value {
    color: #8d8e99;
    .el-input {
      width: 180px;
    }
    .el-textarea {
      width: 350px;
    }
  }
  .priceUnit {
    line-height: 32px;
    font-family: PingFang SC;
    color: #000000;
    font-size: 12px;
  }
  &.req {
    .label {
      &::before {
        content: "*";
        color: red;
      }
    }
  }
  .upload {
    width: 130px;
    height: 37px;
    line-height: 37px;
    color: white;
    margin-right: 15px;
    background: #3894ff;
  }
}
.button {
  height: 30px;
  line-height: 30px;
  padding: 0 30px;
  color: #1996fa;
  background: #e6f1fc;
  border: 1px solid #d0e7fe;
  border-radius: 5px;
}
</style>
